-
-
Notifications
You must be signed in to change notification settings - Fork 458
Add Canvas Capture Strategy #4777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+1,556
−151
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…y-java into markushi/canvas-approach
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 85d7417 | 347.21 ms | 394.35 ms | 47.15 ms |
| d364ace | 411.72 ms | 430.81 ms | 19.10 ms |
| ee747ae | 396.82 ms | 441.67 ms | 44.86 ms |
| bdbe1f4 | 380.66 ms | 464.44 ms | 83.78 ms |
| c8125f3 | 383.82 ms | 441.66 ms | 57.84 ms |
| ee747ae | 386.94 ms | 431.43 ms | 44.49 ms |
| 806307f | 357.85 ms | 424.64 ms | 66.79 ms |
| ee747ae | 554.98 ms | 611.50 ms | 56.52 ms |
| b3d8889 | 371.69 ms | 432.96 ms | 61.26 ms |
| 7314dbe | 437.83 ms | 505.64 ms | 67.81 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 85d7417 | 1.58 MiB | 2.10 MiB | 533.44 KiB |
| d364ace | 1.58 MiB | 2.11 MiB | 539.75 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| bdbe1f4 | 1.58 MiB | 2.11 MiB | 538.88 KiB |
| c8125f3 | 1.58 MiB | 2.10 MiB | 532.32 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| 806307f | 1.58 MiB | 2.10 MiB | 533.42 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| b3d8889 | 1.58 MiB | 2.10 MiB | 535.06 KiB |
| 7314dbe | 1.58 MiB | 2.10 MiB | 533.45 KiB |
Previous results on branch: markushi/canvas-approach
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1b42121 | 377.29 ms | 423.63 ms | 46.34 ms |
| 0a0b1e3 | 353.33 ms | 370.31 ms | 16.98 ms |
| 04bebea | 403.28 ms | 417.84 ms | 14.56 ms |
| 8b7fc28 | 390.50 ms | 444.36 ms | 53.86 ms |
| 1b16487 | 375.34 ms | 440.81 ms | 65.47 ms |
| 379bdab | 347.40 ms | 409.90 ms | 62.50 ms |
| be1b59a | 381.48 ms | 437.07 ms | 55.59 ms |
| 7c02de7 | 364.34 ms | 398.43 ms | 34.09 ms |
| 8b9eb06 | 389.33 ms | 448.42 ms | 59.09 ms |
| 191c05d | 370.45 ms | 429.70 ms | 59.25 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1b42121 | 1.58 MiB | 2.12 MiB | 547.01 KiB |
| 0a0b1e3 | 1.58 MiB | 2.11 MiB | 542.83 KiB |
| 04bebea | 1.58 MiB | 2.12 MiB | 547.06 KiB |
| 8b7fc28 | 1.58 MiB | 2.11 MiB | 543.01 KiB |
| 1b16487 | 1.58 MiB | 2.12 MiB | 547.06 KiB |
| 379bdab | 1.58 MiB | 2.12 MiB | 548.03 KiB |
| be1b59a | 1.58 MiB | 2.12 MiB | 548.03 KiB |
| 7c02de7 | 1.58 MiB | 2.12 MiB | 547.99 KiB |
| 8b9eb06 | 1.58 MiB | 2.12 MiB | 547.07 KiB |
| 191c05d | 1.58 MiB | 2.12 MiB | 547.71 KiB |
romtsn
reviewed
Oct 6, 2025
sentry-android-replay/src/main/java/io/sentry/android/replay/WindowRecorder.kt
Show resolved
Hide resolved
sentry-android-replay/src/main/java/io/sentry/android/replay/screenshot/CanvasStrategy.kt
Outdated
Show resolved
Hide resolved
|
…y-java into markushi/canvas-approach
romtsn
reviewed
Oct 16, 2025
sentry-android-replay/src/main/java/io/sentry/android/replay/ScreenshotRecorder.kt
Show resolved
Hide resolved
romtsn
reviewed
Oct 16, 2025
sentry-android-replay/src/main/java/io/sentry/android/replay/screenshot/CanvasStrategy.kt
Show resolved
Hide resolved
romtsn
reviewed
Oct 16, 2025
sentry-android-replay/src/main/java/io/sentry/android/replay/screenshot/CanvasStrategy.kt
Show resolved
Hide resolved
romtsn
reviewed
Oct 16, 2025
romtsn
reviewed
Oct 16, 2025
romtsn
approved these changes
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few more comments, but not gonna block it. Plus, also not sure if all of the bugbot's comments have to be addressed
…y-java into markushi/canvas-approach
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
Adds an experimental option to enable an alternate way to capture screenshots, using a fake Canvas which draws rectangles instead of text, producing a safer way to mask all sensitive content.
💡 Motivation and Context
No masking issues.
💚 How did you test it?
Manually
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps